﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace octopus_project.util {
    class CSVParser {
        public static List<string[]> parseCSV (string path) {
            List<string[]> parsedData = new List<string[]>();

            try {
                using(StreamReader readFile = new StreamReader(path)) {
                    string line;
                    string[] row;

                    while((line = readFile.ReadLine()) != null) {
                        row = line.Split(',');
                        parsedData.Add(row);
                    }
                }
            }
            catch(Exception e) {
                Console.Write(e.Message);
            }

            return parsedData;
        }
    }
}
